3.2748 \(\int (c x)^m \left (a+b x^n\right )^2 \, dx\)

Optimal. Leaf size=64 \[ \frac{a^2 (c x)^{m+1}}{c (m+1)}+\frac{2 a b x^{n+1} (c x)^m}{m+n+1}+\frac{b^2 x^{2 n+1} (c x)^m}{m+2 n+1} \]

[Out]

(2*a*b*x^(1 + n)*(c*x)^m)/(1 + m + n) + (b^2*x^(1 + 2*n)*(c*x)^m)/(1 + m + 2*n)
+ (a^2*(c*x)^(1 + m))/(c*(1 + m))

_______________________________________________________________________________________

Rubi [A]  time = 0.0879358, antiderivative size = 64, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2 \[ \frac{a^2 (c x)^{m+1}}{c (m+1)}+\frac{2 a b x^{n+1} (c x)^m}{m+n+1}+\frac{b^2 x^{2 n+1} (c x)^m}{m+2 n+1} \]

Antiderivative was successfully verified.

[In]  Int[(c*x)^m*(a + b*x^n)^2,x]

[Out]

(2*a*b*x^(1 + n)*(c*x)^m)/(1 + m + n) + (b^2*x^(1 + 2*n)*(c*x)^m)/(1 + m + 2*n)
+ (a^2*(c*x)^(1 + m))/(c*(1 + m))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 12.6754, size = 73, normalized size = 1.14 \[ \frac{a^{2} \left (c x\right )^{m + 1}}{c \left (m + 1\right )} + \frac{2 a b x^{- m} x^{m + n + 1} \left (c x\right )^{m}}{m + n + 1} + \frac{b^{2} x^{2 n} \left (c x\right )^{- 2 n} \left (c x\right )^{m + 2 n + 1}}{c \left (m + 2 n + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((c*x)**m*(a+b*x**n)**2,x)

[Out]

a**2*(c*x)**(m + 1)/(c*(m + 1)) + 2*a*b*x**(-m)*x**(m + n + 1)*(c*x)**m/(m + n +
 1) + b**2*x**(2*n)*(c*x)**(-2*n)*(c*x)**(m + 2*n + 1)/(c*(m + 2*n + 1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0537255, size = 47, normalized size = 0.73 \[ x (c x)^m \left (\frac{a^2}{m+1}+\frac{2 a b x^n}{m+n+1}+\frac{b^2 x^{2 n}}{m+2 n+1}\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(c*x)^m*(a + b*x^n)^2,x]

[Out]

x*(c*x)^m*(a^2/(1 + m) + (2*a*b*x^n)/(1 + m + n) + (b^2*x^(2*n))/(1 + m + 2*n))

_______________________________________________________________________________________

Maple [C]  time = 0.075, size = 234, normalized size = 3.7 \[{\frac{x \left ({b}^{2}{m}^{2} \left ({x}^{n} \right ) ^{2}+{b}^{2}mn \left ({x}^{n} \right ) ^{2}+2\,ab{m}^{2}{x}^{n}+4\,abmn{x}^{n}+2\,m{b}^{2} \left ({x}^{n} \right ) ^{2}+{b}^{2}n \left ({x}^{n} \right ) ^{2}+{a}^{2}{m}^{2}+3\,{a}^{2}mn+2\,{a}^{2}{n}^{2}+4\,mab{x}^{n}+4\,abn{x}^{n}+{b}^{2} \left ({x}^{n} \right ) ^{2}+2\,m{a}^{2}+3\,{a}^{2}n+2\,a{x}^{n}b+{a}^{2} \right ) }{ \left ( 1+m \right ) \left ( 1+m+n \right ) \left ( 1+m+2\,n \right ) }{{\rm e}^{{\frac{m \left ( -i\pi \, \left ({\it csgn} \left ( icx \right ) \right ) ^{3}+i\pi \, \left ({\it csgn} \left ( icx \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +i\pi \, \left ({\it csgn} \left ( icx \right ) \right ) ^{2}{\it csgn} \left ( ix \right ) -i\pi \,{\it csgn} \left ( icx \right ){\it csgn} \left ( ic \right ){\it csgn} \left ( ix \right ) +2\,\ln \left ( x \right ) +2\,\ln \left ( c \right ) \right ) }{2}}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((c*x)^m*(a+b*x^n)^2,x)

[Out]

x*(b^2*m^2*(x^n)^2+b^2*m*n*(x^n)^2+2*a*b*m^2*x^n+4*a*b*m*n*x^n+2*m*b^2*(x^n)^2+b
^2*n*(x^n)^2+a^2*m^2+3*a^2*m*n+2*a^2*n^2+4*m*a*b*x^n+4*a*b*n*x^n+b^2*(x^n)^2+2*m
*a^2+3*a^2*n+2*a*x^n*b+a^2)/(1+m)/(1+m+n)/(1+m+2*n)*exp(1/2*m*(-I*Pi*csgn(I*c*x)
^3+I*Pi*csgn(I*c*x)^2*csgn(I*c)+I*Pi*csgn(I*c*x)^2*csgn(I*x)-I*Pi*csgn(I*c*x)*cs
gn(I*c)*csgn(I*x)+2*ln(x)+2*ln(c)))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^2*(c*x)^m,x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.235314, size = 232, normalized size = 3.62 \[ \frac{{\left (b^{2} m^{2} + 2 \, b^{2} m + b^{2} +{\left (b^{2} m + b^{2}\right )} n\right )} x x^{2 \, n} e^{\left (m \log \left (c\right ) + m \log \left (x\right )\right )} + 2 \,{\left (a b m^{2} + 2 \, a b m + a b + 2 \,{\left (a b m + a b\right )} n\right )} x x^{n} e^{\left (m \log \left (c\right ) + m \log \left (x\right )\right )} +{\left (a^{2} m^{2} + 2 \, a^{2} n^{2} + 2 \, a^{2} m + a^{2} + 3 \,{\left (a^{2} m + a^{2}\right )} n\right )} x e^{\left (m \log \left (c\right ) + m \log \left (x\right )\right )}}{m^{3} + 2 \,{\left (m + 1\right )} n^{2} + 3 \, m^{2} + 3 \,{\left (m^{2} + 2 \, m + 1\right )} n + 3 \, m + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^2*(c*x)^m,x, algorithm="fricas")

[Out]

((b^2*m^2 + 2*b^2*m + b^2 + (b^2*m + b^2)*n)*x*x^(2*n)*e^(m*log(c) + m*log(x)) +
 2*(a*b*m^2 + 2*a*b*m + a*b + 2*(a*b*m + a*b)*n)*x*x^n*e^(m*log(c) + m*log(x)) +
 (a^2*m^2 + 2*a^2*n^2 + 2*a^2*m + a^2 + 3*(a^2*m + a^2)*n)*x*e^(m*log(c) + m*log
(x)))/(m^3 + 2*(m + 1)*n^2 + 3*m^2 + 3*(m^2 + 2*m + 1)*n + 3*m + 1)

_______________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c*x)**m*(a+b*x**n)**2,x)

[Out]

Exception raised: TypeError

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.230653, size = 841, normalized size = 13.14 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)^2*(c*x)^m,x, algorithm="giac")

[Out]

(b^2*m^2*x*e^(m*ln(c) + m*ln(x) + 2*n*ln(x)) + b^2*m*n*x*e^(m*ln(c) + m*ln(x) +
2*n*ln(x)) + 2*a*b*m^2*x*e^(m*ln(c) + m*ln(x) + n*ln(x)) + b^2*m^2*x*e^(m*ln(c)
+ m*ln(x) + n*ln(x)) + 4*a*b*m*n*x*e^(m*ln(c) + m*ln(x) + n*ln(x)) + b^2*m*n*x*e
^(m*ln(c) + m*ln(x) + n*ln(x)) + a^2*m^2*x*e^(m*ln(c) + m*ln(x)) + 2*a*b*m^2*x*e
^(m*ln(c) + m*ln(x)) + b^2*m^2*x*e^(m*ln(c) + m*ln(x)) + 3*a^2*m*n*x*e^(m*ln(c)
+ m*ln(x)) + 4*a*b*m*n*x*e^(m*ln(c) + m*ln(x)) + b^2*m*n*x*e^(m*ln(c) + m*ln(x))
 + 2*a^2*n^2*x*e^(m*ln(c) + m*ln(x)) + 2*b^2*m*x*e^(m*ln(c) + m*ln(x) + 2*n*ln(x
)) + b^2*n*x*e^(m*ln(c) + m*ln(x) + 2*n*ln(x)) + 4*a*b*m*x*e^(m*ln(c) + m*ln(x)
+ n*ln(x)) + 2*b^2*m*x*e^(m*ln(c) + m*ln(x) + n*ln(x)) + 4*a*b*n*x*e^(m*ln(c) +
m*ln(x) + n*ln(x)) + b^2*n*x*e^(m*ln(c) + m*ln(x) + n*ln(x)) + 2*a^2*m*x*e^(m*ln
(c) + m*ln(x)) + 4*a*b*m*x*e^(m*ln(c) + m*ln(x)) + 2*b^2*m*x*e^(m*ln(c) + m*ln(x
)) + 3*a^2*n*x*e^(m*ln(c) + m*ln(x)) + 4*a*b*n*x*e^(m*ln(c) + m*ln(x)) + b^2*n*x
*e^(m*ln(c) + m*ln(x)) + b^2*x*e^(m*ln(c) + m*ln(x) + 2*n*ln(x)) + 2*a*b*x*e^(m*
ln(c) + m*ln(x) + n*ln(x)) + b^2*x*e^(m*ln(c) + m*ln(x) + n*ln(x)) + a^2*x*e^(m*
ln(c) + m*ln(x)) + 2*a*b*x*e^(m*ln(c) + m*ln(x)) + b^2*x*e^(m*ln(c) + m*ln(x)))/
(m^3 + 3*m^2*n + 2*m*n^2 + 3*m^2 + 6*m*n + 2*n^2 + 3*m + 3*n + 1)